package com.zhengjiang.pattern.demo.decorator;

/**
 * 装饰器实现类
 */
public class IPhonePurchaseAction implements PurchaseAction {

    private PurchaseAction customer;

    IPhonePurchaseAction(PurchaseAction customer){
        this.customer = customer;
    }

    @Override
    public Double cost() {
        return customer.cost() + 3888;
    }

    @Override
    public void show() {
        customer.show();
        System.out.println("购买 iPhone");
    }
}
